const mongoose = require('mongoose');

const messageSchema = new mongoose.Schema({
    message: {
        content: {
            type: String,
            required: true
        },
        type: {
            type: String,
            default: "text"
        }
    },
    userIds: {
        type: Array,
        required: true,
    },
    senderId: {
        type: String,
        required: true
    }
}, {
    timestamps: true
})

module.exports = mongoose.model("Messages", messageSchema);